
# 消费者
from celery_tasks.main import app
from ronglian_sms_sdk import SmsSDK
@app.task
def send_code(mobile,code):
    accId = '2c94811c8a27cf2d018a3ef7bcf6076e'
    accToken = '5bf4960e30f94e3c928dbf814bd73f7e'
    appId = '2c94811c8a27cf2d018a3ef7be420775'
    sdk = SmsSDK(accId,accToken,appId)
    datas =(code,1)
    # 根据手机号进行发送，以及过期时间和信息
    res = sdk.sendMessage('1',mobile,datas)
    print(res)

